﻿using System;
using System.Collections.Generic;
//using System.Linq;
using System.Text;
using System.Data;

namespace Client
{
    #region -  DELEGATES  -
    public delegate void SendFilePercentEventHandler(object sender, PercentEventArgs e);
    public delegate void SendFilenameEventHandler(object sender, FilenameEventArgs e);
    public delegate void ReceiveFilePercentEventHandler(object sender, PercentEventArgs e);
    public delegate void ReceiveFilenameEventHandler(object sender, FilenameEventArgs e);
    public delegate void ReceiveFileEventHandler(int current, int total);
    public delegate void StatusMessageEventHandler(object sender, StatusMessageEventArgs e);
    public delegate void LoadListClientsEventHandler(object sender, LoadListClientsEventArgs e);
    public delegate void USBDetectedEventHandler(object sender, USBDetectedEventArgs e);
    public delegate void SendMessageEventHandler(object sender, MessageEventArgs e);
    public delegate void ReceiveMessageEventHandler(object sender, MessageEventArgs e);
    public delegate void CloseMessageEventHandler(object sender, CloseMessageEventArgs e);
    public delegate void FormExitEventHandler(object sender, FormExitEvenArgs e);
    public delegate void GetFilePathEventHandler(object sender, FileInfoEventArgs e);
    public delegate void SetDatasetEventhander(object sender, SetDataSetEventAgrs ds);
    public delegate void ViewDesktopClientEventHandler(object sender, ViewDesktopClientEventsArgs e);
    public delegate void SetReceiveInfoProcessEventHanle(object sender, SetReceivePrcessEventArge e);
    public delegate void AttendenceCheckEventHandler(object sender, AttendenceCheckEventArgs e);
    public delegate void ActiveAttendenceCheckEventHandler(object sender, ActiveAttendenceCheckEventArgs e);
    public delegate void GetListProcessesEventHandler(object sender, GetListProcessesEventArgs e);
    public delegate void SaveFileEventHandler(object sender, SaveFileEventArgs e);
    public delegate void SetServerIPAddressEventHandler(object sender, SetServerIPAddressEventArgs e);
    public delegate void StopSendFileEventHandler(object sender, EventArgs e);
    public delegate void RestartClientEventHandler(object sender, EventArgs e);
    public delegate void MyPopUpEventHandler(object sender, MyPopUpEventArgs e);
    #endregion

    #region - EVENT ARGS  -
    public class MyPopUpEventArgs : EventArgs
    {
        private string message;

        public string Message
        {
            get { return message; }
            set { message = value; }
        }

        public MyPopUpEventArgs()
            : base()
        { }

        public MyPopUpEventArgs(string message)
            : this()
        {
            this.Message = message;
        }
    }

    public class SetServerIPAddressEventArgs : EventArgs
    {
        private string ipAddress;

        public string IpAddress
        {
            get { return ipAddress; }
            set { ipAddress = value; }
        }

        public SetServerIPAddressEventArgs()
        { }

        public SetServerIPAddressEventArgs(string ipAddress)
        {
            this.IpAddress = ipAddress;
        }
    }
    public class SaveFileEventArgs : EventArgs
    {
        private string filePath;

        public string FilePath
        {
            get { return filePath; }
            set { filePath = value; }
        }

        public SaveFileEventArgs()
        { }

        public SaveFileEventArgs(string filePath)
        {
            this.FilePath = filePath;
        }
    }
    public class GetListProcessesEventArgs : EventArgs
    {
        private string list;

        public string List
        {
            get
            {
                return this.list;
            }
            set
            {
                this.list = value;
            }
        }

        public GetListProcessesEventArgs(string list)
        {
            this.List = list;
        }
    }
    public class ActiveAttendenceCheckEventArgs : EventArgs
    {
        public ActiveAttendenceCheckEventArgs()
        { }
    }
    public class AttendenceCheckEventArgs : EventArgs
    {
        private string mssv;

        public string Mssv
        {
            get { return mssv; }
            set { mssv = value; }
        }
        private string name;

        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        public AttendenceCheckEventArgs(string mssv, string name)
        {
            this.Mssv = mssv;
            this.Name = name;
        }
    }
    public class SetReceivePrcessEventArge : EventArgs
    {
        bool b;

        public bool B
        {
            get { return b; }
            set { b = value; }
        }
        DataSet ds;

        public DataSet Ds
        {
            get { return ds; }
            set { ds = value; }
        }
        public SetReceivePrcessEventArge(bool b, DataSet ds)
        {
            this.b = b;
            this.ds = ds;
        }
    }
    public class SetDataSetEventAgrs : EventArgs
    {
        DataSet ds;

        public DataSet Ds
        {
            get { return ds; }
            set { ds = value; }
        }
        public SetDataSetEventAgrs(DataSet ds)
        {
            this.ds = ds;
        }
    }
    public class ViewDesktopClientEventsArgs : EventArgs
    {
        private byte[] img;
        public byte[] Img
        {
            get
            {
                return this.img;
            }
            set
            {
                this.img = value;
            }
        }

        public ViewDesktopClientEventsArgs(byte[] img)
        {
            this.Img = img;
        }
    }
    public class FileInfoEventArgs : EventArgs
    {
        private string filePath;

        public string FilePath
        {
            get { return filePath; }
            set { filePath = value; }
        }

        private int length;

        public int Length
        {
            get { return length; }
            set { length = value; }
        }

        public FileInfoEventArgs(string filePath, int length)
        {
            this.FilePath = filePath;
            this.Length = length;
        }
    }
    public class FormExitEvenArgs : EventArgs
    {
        public FormExitEvenArgs()
        { }
    }
    public class CloseMessageEventArgs : EventArgs
    {
        private string ipAddress;
        public string IpAddress
        {
            get
            {
                return this.ipAddress;
            }
            set
            {
                this.ipAddress = value;
            }
        }
        public CloseMessageEventArgs(string ipAddress)
        {
            this.IpAddress = ipAddress;
        }
    }
    public class USBDetectedEventArgs : EventArgs
    {
        public USBDetectedEventArgs()
        {
        }
    }
    public class PercentEventArgs : EventArgs
    {
        private int percent;
        public int Percent
        {
            get
            {
                return this.percent;
            }
            set
            {
                this.percent = value;
            }
        }

        public PercentEventArgs(int percent)
        {
            this.Percent = percent;
        }
    }
    public class FilenameEventArgs : EventArgs
    {
        private string filename;
        public string Filename
        {
            get
            {
                return this.filename;
            }
            set
            {
                this.filename = value;
            }
        }
        public FilenameEventArgs(string filename)
        {
            this.Filename = filename;
        }
    }
    public class StatusMessageEventArgs : EventArgs
    {
        private string message;
        public string Message
        {
            get
            {
                return this.message;
            }
            set
            {
                this.message = value;
            }
        }

        public StatusMessageEventArgs(string message)
        {
            this.Message = message;
        }
    }
    public class LoadListClientsEventArgs : EventArgs
    {
        private List<ClientProgram> listClients;
        public List<ClientProgram> ListClients
        {
            get
            {
                return this.listClients;
            }
            set
            {
                this.listClients = value;
            }
        }

        public LoadListClientsEventArgs(List<ClientProgram> listClients)
        {
            this.ListClients = listClients;
        }
    }
    public class MessageEventArgs : EventArgs
    {
        private string message;
        public string Message
        {
            get
            {
                return this.message;
            }
            set
            {
                this.message = value;
            }
        }

        public MessageEventArgs(string message)
        {
            this.Message = message;
        }
    }
    #endregion
}
